package com.stackexchange.webapis
{
	public class Answer
	{
		/**
		 * whether this answer is the accepted answer on its question
		 **/
		public var accepted:Boolean;
		
		/**
		 * a link to the method that returns comments on this answer
		 **/
		public var answerCommentsUrl:String;
		
		/**
		 * id of the answer
		 **/
		public var answerId:String;
		
		/**
		 * whether this post is community owned
		 **/
		public var communityOwned:Boolean;
		
		/**
		 * date this post was created
		 **/
		public var creationDate:Date;
		
		/**
		 * number of down votes on this post
		 **/
		public var downVoteCount:int;
		
		/**
		 * last time this post had any activity
		 **/
		public var lastActivityDate:Date;
		
		/**
		 * last time this post was edited
		 **/
		public var lastEditDate:Date;
		
		/**
		 * id of the question this post is or is on
		 **/
		public var questionId:String;
		
		/**
		 * score of this post
		 **/
		public var score:int;
		
		/**
		 * "title of this post, in plaintext
		 **/
		public var title:String;
		
		/**
		 * number of up votes on this post
		 **/
		public var upVoteCount:int;
		
		/**
		 * number of times this post has been viewed
		 **/
		public var viewCount:int;
		
		/**
		 * date this question was locked
		 **/
		public var lockedDate:Date;
		
		/**
		 * body of this post, rendered as HTML
		 **/
		public var body:String;
		
		/**
		 * owner of the answer
		 **/
		public var owner:User;
		
		private var _comments:Array  /* of Comment */ = new Array();
		
		public function addComment(value:Comment):void
		{
			_comments.push(value);
		}
		
		/**
		 * Answer comments 
		 **/
		public function get comments():Array
		{
			return comments.slice()
		}
		
	}
}